<html>
<body>
<div id="tabcontent">
<h1>User <?php echo $filtered?"[Terfilter]":""; ?></h1>
<span class='header_halaman'>
<?php echo "Halaman : ";echo  strlen($total_page)==0?"1":$total_page; ?>
</span><br/>
Jumlah User<?php echo $filtered?"[Terfilter]":""; ?> : <?php echo format_number($config["total_rows"]); ?><br>
<br/>
<div class='toolbar ui-widget-header ui-corner-all'>
<a href='<?php echo site_url("/admin/cuser/add");?>' class='link_add'>Tambah</a>
<a href='<?php echo site_url("/admin/cuser/export");?>' class='link_export'>Export</a>
&nbsp;<b>Cari Berdasarkan :</b>
<select name="field" id='field'>
<option value="nama_provinsi">Nama</option>
</select>
<input type="text" name='pencarian' value="" id='pencarian'>
<input type="button" value='Cari' id='cari'>
<input type="button" value='Clear Filter' id='clear'>
</div>
<table width='100%' class='view_all_data' cellpadding="3px" cellspacing="1px">
<tr class="view_all_data_header">
	<td width='30px' align='center'>NO.</td>
	<td align='center'>Nama</td>
	<td align='center'>Email</td>
	<td align='center'>IP Input</td>
	<td align='center'>Last Login Date</td>
	<td align='center'>Last Login IP</td>
	<td align='center'>Action</td>
	</tr>
<?php
     $c=(1*$offset)+1; 
	 foreach($result as $row)
	 {
?>
<tr class="view_all_data_row">
	<td width='30px' align="center"><?php echo $c; ?></td>
	<td><?php echo $row->nama_user; ?></td>
	<td><?php echo $row->email; ?></td>
	<td><?php echo $row->ip_input; ?></td>
	<td><?php echo $row->last_login_date; ?></td>
	<td><?php echo $row->last_login_ip; ?></td>
	<td align='center'>	
		<a href="<?php echo site_url("/admin/cuser/edit/".$row->id_user); ?>">Edit</a> | 
		<a href="<?php echo site_url("/admin/cuser/hapus/".$row->id_user); ?>">Hapus</a>
	</td>
	</tr>
<?php 
	$c++;
	}
?>
</table>
</div>
		
<script language="javascript" type="text/javascript">
var browser_ie  = $.browser.msie;
var browser_moz = $.browser.mozilla;
var browser_wk  = $.browser.safari;
var browser_op  = $.browser.opera;

$(document).ready(function() {
	/*************************
	** fixing some UI issue **
	*************************/
	if (browser_ie) {
		var div_tab_header   = $('#tab_header');
		var div_tab_header_a = $(div_tab_header).find('a');

		for (m = 0; m < div_tab_header_a.length; m++) $(div_tab_header_a[m]).addClass('ie_only');

		var div_add_util   = $('#content_table_util');
		var div_add_util_a = $(div_add_util).find('a');

		for (m = 0; m < div_add_util_a.length; m++) $(div_add_util_a[m]).addClass('ie_only');
	}
	/*****************************
	** END fixing some UI issue **
	*****************************/		
});

function addNew()
{
	
}

function download()
{
}

function print()
{
}

</script>		
<script language="javascript">
var site_url="<?php echo site_url();?>";

$(document).ready(function(){
	$("#cari").click(function(){
		var field=$("#field").val();
		var cari=$("#pencarian").val();
		var url = site_url + "/admin/cuser/index/0/" + field + "/" + cari;
		window.open(url,"_self");
	});
	
	$("#clear").click(function(){
		var url = site_url + "/admin/cuser/index/0";
		window.open(url,"_self");	
	});
});
</script>
</body>
</html>